Solved: Change the name of a VBA form programmically. | 您所在的位置:网站首页 › error on rename of frm › Solved: Change the name of a VBA form programmically. |
I'm using VBA to create a UserForm with controls on it, That all works, however each UserForm is created with the name UserForm1, UserForm2, etc. I'm unable to programmically change the UserFrom name using: Application.ActiveDocument.VBProject.VBComponents("UserForm1").Name = "ufMainColorForm" I get the following error "Run-time error 75: Path/File access error" The "Name" property seems to be read-only, i.e., I can list all the form names, just can't change any of them except manually through the IDE. Above example is from MS Word, but Excel shows the same problem. Any suggestions would be much appreciated. |
CopyRight 2018-2019 实验室设备网 版权所有 |